#include "sin_rom.hpp"


// Each output data point comes from taking the dot product
// between this function and the history of measured values.
// The table contains sin and cos multiplied by a window function
// that is a convolution between a rect with width of one IF period
// and a gaussian window.

const int16_t sinROM25x2[100] = {
464, 0,
1018, -261,
1558, -856,
1939, -1821,
1987, -3132,
1524, -4691,
397, -6316,
-1479, -7751,
-4089, -8690,
-7294, -8817,
-10824, -7864,
-14296, -5660,
-17255, -2180,
-19235, 2430,
-19826, 7850,
-18739, 13615,
-15856, 19167,
-11257, 23922,
-5216, 27342,
1825, 29000,
9304, 28634,
16605, 26165,
23120, 21711,
28307, 15562,
31738, 8149,
32303, 0,
30720, -7888,
27156, -14929,
21947, -20610,
15570, -24534,
8601, -26472,
1660, -26386,
-4661, -24435,
-9862, -20959,
-13592, -16430,
-15685, -11396,
-16170, -6402,
-15254, -1927,
-13274, 1677,
-10640, 4213,
-7770, 5645,
-5030, 6080,
-2695, 5726,
-924, 4845,
233, 3702,
822, 2530,
952, 1501,
766, 719,
407, 223,
0, 0}; //*/

const int16_t sinROM24x2[96] = {
530, 0,
1153, -309,
1738, -1004,
2111, -2111,
2068, -3582,
1414, -5278,
0, -6965,
-2233, -8333,
-5215, -9033,
-8731, -8731,
-12423, -7173,
-15825, -4240,
-18422, 0,
-19723, 5285,
-19344, 11168,
-17070, 17070,
-12901, 22345,
-7067, 26373,
0, 28631,
7708, 28767,
15380, 26639,
22326, 22326,
27918, 16118,
31650, 8481,
32237, 0,
30498, -8172,
26639, -15380,
21059, -21059,
14315, -24795,
7067, -26373,
0, -25802,
-6248, -23317,
-11168, -19344,
-14439, -14439,
-15954, -9211,
-15825, -4240,
-14345, 0,
-11927, 3196,
-9033, 5215,
-6100, 6100,
-3482, 6032,
-1414, 5278,
0, 4136,
773, 2883,
1004, 1738,
844, 844,
459, 265,
0, 0};

const int16_t sinROM6x2[24] = {
5277, 0,
5387, -9330,
-8192, -14189,
-21993, 0,
-13745, 23807,
16384, 28377,
27490, 0,
10997, -19047,
-8192, -14189,
-10774, 0,
-2638, 4570,
0, 0};

const int16_t sinROM3x4[24] = {
5277, 0,
-5387, -9330,
-8192, 14189,
21993, 0,
-13745, -23807,
-16383, 28377,
27490, 0,
-10997, -19047,
-8192, 14189,
10774, 0,
-2638, -4570,
0, 0};

